package com.zhitong.money.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * 密码加密工具
 */
public class MD5Util {
    public static String encryptPassword(String userName,String password){
        int count=1024;
        String salt=userName;
        String name="MD5";
        return new SimpleHash(name, password, ByteSource.Util.bytes(salt), count).toHex();
    }
}
